home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 359 / def / aescalls.def next >
Encoding:
Modula Definition  |  1989-01-09  |  5.7 KB  |  169 lines

  1. DEFINITION MODULE AEScalls;
  2.  
  3. (*
  4.  *  Copyright (c) 1987,1988,1989 by
  5.  *  ana-systems, Foster City, California.
  6.  *  All Rights Reserved.
  7.  *
  8.  *  This software is furnished under a license and may be used and copied
  9.  *  only  in accordance with  the  terms  of  such  license and  with the
  10.  *  inclusion of the above copyright notice.  This software or  any other
  11.  *  copies thereof may not be provided or otherwise made available to any
  12.  *  other  person.   No title to and ownership of the  software is  herby
  13.  *  transferred.
  14.  *
  15.  *  The information in this software is  subject to change without notice
  16.  *  and  should  not be construed as a commitment by ana-systems.   No
  17.  *  warranty is implied or expressed.
  18.  *)
  19.  
  20. FROM SYSTEM IMPORT ADDRESS;
  21.  
  22. EXPORT QUALIFIED GrafHandle,ApplExit,FormAlert,RsrcLoad,RsrcGaddr,
  23.                  RsrcFree,MenuBar,EvntMulti,MenuTNormal,GrafMouse,
  24.                  FselInput,FormDo,FormDial,FormCenter,ObjcDraw,ObjcChange,
  25.                  FormError,MenuIEnable,GrafMKState;
  26.  
  27. PROCEDURE GrafHandle(VAR cellW,cellH,boxW,boxH:INTEGER):INTEGER;
  28. (*
  29.  *  Returns the physHandle and places the size, in pixels,
  30.  *  of a character cell and character box in the VAR parameters.
  31.  *)
  32.  
  33. PROCEDURE ApplExit():INTEGER;
  34. (*
  35.  *  Notify AES the application is closing.
  36.  *  Returns 0 for error and >0 for success.
  37.  *)
  38.  
  39. PROCEDURE FormAlert(defBtn:INTEGER; VAR aString:ARRAY OF CHAR):INTEGER;
  40. (*
  41.  *  Dispay an alert box.  Parameters are default button and 
  42.  *  alert message.  Returns the number of the button used for exit.
  43.  *
  44.  *  defBtn may be 1, 2, or 3 depending on the number of buttons.
  45.  *  aString must have the form "[ icon num ][ message ][ button(s) ]".
  46.  *)
  47.  
  48. PROCEDURE FormError(error:INTEGER);
  49. (*
  50.  *  Display an error message appropriate to the error number passed.
  51.  *)
  52.  
  53. PROCEDURE RsrcLoad(VAR resFname:ARRAY OF CHAR):INTEGER;
  54. (*
  55.  *  Load resource file 'resFname' into memory.
  56.  *  Returns 0 for error and >0 for success.
  57.  *)
  58.  
  59. PROCEDURE RsrcGaddr(resType,resIndex:INTEGER; VAR resaddr:ADDRESS):INTEGER;
  60. (*
  61.  *  Get address of a particular object within the file. resType is the
  62.  *  type of object; resIndex is its position within the object tree.
  63.  *  Returns 0 for error and >0 for success.
  64.  *)
  65.  
  66. PROCEDURE RsrcFree():INTEGER;
  67. (*
  68.  *  Dump the resource file and free its memory.
  69.  *  Returns 0 for error and >0 for success.
  70.  *)
  71.  
  72. PROCEDURE MenuBar(mnTree:ADDRESS; mnFlag:INTEGER):INTEGER;
  73. (*
  74.  *  Display or erase a menubar.  mnFlag=0  erase menu
  75.  *                               mnFlag=1  show menu
  76.  *  Returns 0 for error and >0 for success.
  77.  *)
  78.  
  79. PROCEDURE MenuIEnable(mnTree:ADDRESS; mnItem,mnSetting:INTEGER):INTEGER;
  80. (*
  81.  *  Disable of enable a menu item.  mnFlag=0  disable
  82.  *                                  mnFlag=1  enable
  83.  *  Returns 0 for error and >0 for success.
  84.  *)
  85.  
  86. PROCEDURE EvntMulti(evFlags,bClicks,bMask,bState,
  87.                     m1Flag,m1X,m1Y,m1Width,m1Height,
  88.                     m2Flag,m2X,m2Y,m2Width,m2Height:INTEGER;
  89.                     VAR msgBuf:ARRAY OF INTEGER;
  90.                     timerLo,timerHi:INTEGER;
  91.                     VAR mouseX,mouseY,mouseBtn,keyState,
  92.                     keyReturn,clickReturn:INTEGER):INTEGER;
  93. (*
  94.  *  Wait for any of the events specified in the evflags variable.
  95.  *  Return the events.
  96.  *)                    
  97.  
  98. PROCEDURE MenuTNormal(mnTree:ADDRESS; mnTitle,mnNormal:INTEGER):INTEGER;
  99. (*
  100.  *  Use to highlight or de-highlight menu titles.
  101.  *  mnNormal=0 highlight
  102.  *          =1 de-highlight
  103.  *  Returns 0 for error and >0 for success.
  104.  *)
  105.  
  106. PROCEDURE GrafMouse(formNum:INTEGER; formDef:ADDRESS):INTEGER;
  107. (*
  108.  *  Change the mouse form.  formNum=256 to turn mouse off
  109.  *                                 =257 to turn mouse on
  110.  *                                 =0   to make arrow shape
  111.  *                                      ( and others... )
  112.  *  Set formDef NIL if a predefined shape is used.
  113.  *  Returns 0 for error and >0 for success.
  114.  *)
  115.  
  116. PROCEDURE FselInput(VAR defPath,defFname:ARRAY OF CHAR;
  117.                     VAR button:INTEGER):INTEGER;
  118. (*
  119.  *  Display the standard Item Selector with path and filename
  120.  *  provided.  Returns path and filename choosen, along with
  121.  *  button choosen: 0=cancel, 1=Ok.
  122.  *  Returns 0 for error and >0 for success.
  123.  *)
  124.  
  125. PROCEDURE FormDo(dlogTree:ADDRESS; startObj:INTEGER):INTEGER;
  126. (*
  127.  *  Handles interaction with dialog box.  Returns exit object.
  128.  *)
  129.  
  130. PROCEDURE FormDial(formCmd,smallX,smallY,smallW,smallH,
  131.                    bigX,bigY,bigW,bigH:INTEGER):INTEGER;
  132. (*
  133.  *  Reserves or dumps screen space for dialog box.  Also can
  134.  *  draw expanding or shrinking box.  The 'big_' parameters
  135.  *  indicate the size of the box which you can get from
  136.  *  FormCenter().  formCmd tell what you want to do with the box.
  137.  *  Returns 0 for error and >0 for success.
  138.  *)
  139.  
  140. PROCEDURE FormCenter(dlogTree:ADDRESS; VAR newX,newY,newW,newH:INTEGER);
  141. (*
  142.  *  Calculates position for centering box; returns these values
  143.  *  and puts them in the box's object record.
  144.  *)
  145.  
  146. PROCEDURE ObjcDraw(objTree:ADDRESS; objStart,objDepth,
  147.                    clipX,clipY,clipW,clipH:INTEGER):INTEGER;
  148. (*
  149.  *  Draw objDepth number of object levels in objTree, starting with
  150.  *  objStart.  Must specify the clipping rectangle.
  151.  *  Returns 0 for error and >0 for success.
  152.  *)
  153.  
  154. PROCEDURE ObjcChange(objTree:ADDRESS; objc,resvd,clipX,clipY,clipW,clipH,
  155.                      newstate,redraw:INTEGER):INTEGER;
  156. (*
  157.  *  Change the state of an object (as in a dialog box).
  158.  *  Returns 0 for error and >0 for success.
  159.  *)
  160.  
  161. PROCEDURE GrafMKState(VAR mouseX,mouseY,
  162.                           mouseBut,keyState:INTEGER):INTEGER;
  163. (*
  164.  *  Provides the current mouse position, mouse button state,
  165.  *  and shift/control/alt key state.
  166.  *)
  167.  
  168. END AEScalls.
  169.